function logout(){
	$.get("./index.php?do=index/Ajax&action=logout",function(data){
		window.location.href="./index.php?do=index/login";
	})
}


function deletedata(deltype,id){
	if(window.confirm("您确定要删除这项？")){
		$.get("./index.php?do=index/Ajax&action=deletedata&deltype="+deltype+"&id="+id,function(data){
			window.location.reload();
		})
	}else{
	}

}


function showBox(channelid,type,classid){
	var url = ''
	var title = ''
	switch (type) {
		case 'record' :
			url = 'index.php?do=Record/record_list&channelid='+channelid+'&classid='+classid;
			title = '录制管理';
			break;
		case 'stream' :
			url = 'index.php?do=Stream/stream_list&channelid='+channelid+'&classid='+classid;
			title = '流信息管理';
			break;
		default :
			break;
	}
	console.log(channelid);

	if (url.length>0){
		tb_show(title,url+'&width=850&height=450&TB_iframe=true&modal=false','');	
	}

}



function removeBox(href){
	tb_remove();
	if (href.length>0){
		$("#main").attr("src",href);
	}
}


function getStreamStatus(){
	
}




